<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<a href="http://localhost:8080/webdemo/demo1?name=test&pwd=******">模拟一个请求</a>

<form action="http://localhost:8080/webdemo/demo1" method="post"><!-- 提交表单到地址 -->
    <input type="text" name="nameP"/>
    <input type="text" name="pwdP"/>
    <input type="submit" value="提交表单"/>
</form>

<script src="jquery-3.0.0.min.js"></script>
<script type="text/javascript">
    var o ={'name':'laowang','age':'28'};
     $.ajax({
         type:"post",
         url:"demo1",
         data:{
             "name":"wang",
             "age":28
         }
     });
</script>
</body>
</html>